package com.webchat.rmi.pgc;

import com.webchat.common.bean.APIResponseBean;
import com.webchat.domain.vo.request.MessageCardTemplateRequestVO;
import com.webchat.domain.vo.response.MessageCardTemplateResponseVO;
import com.webchat.rmi.interceptor.RpcRequestInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(name = "webchat-pgc-service",
        contextId = "messageCardTemplateClient",
        configuration = RpcRequestInterceptor.class)
public interface MessageCardTemplateClient {


    /**
     * 提供消息卡片模版配置服务
     *
     * @param templateRequest
     * @return
     */
    @PostMapping("/pgc-service/message-card/template/save")
    APIResponseBean<String> save(@RequestBody MessageCardTemplateRequestVO templateRequest);

    /**
     * 根据模版ID获取模版配置详情
     *
     * @param templateId
     * @return
     */
    @GetMapping("/pgc-service/message-card/template/{templateId}")
    APIResponseBean<MessageCardTemplateResponseVO> template(@PathVariable String templateId);
}
